#include <iostream>
#include <string>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
using namespace std;
#include "HashTable.h"
#include "UnorderedMap.h"
#include "UnorderedSet.h"
void test_unordered_set1()
{

    unordered_set<int> s;
    s.insert(1);
    s.insert(3);
    s.insert(2);
    s.insert(7);
    s.insert(2);

    auto it = s.begin();
    while (it != s.end())
    {
        cout << *it << " ";
        ++it;
    }
    cout << endl;

    for (auto e : s)
    {
        cout << e << " ";
    }
    cout << endl;
}

void test_unordered_map()
{
    string arr[] = { "", "", "ƻ", "", "ƻ", "ƻ", "", "ƻ", "㽶", "ƻ", "㽶", "" };
    unordered_map<string, int> countMap;
    for (auto& e : arr)
    {
        countMap[e]++;
    }

    for (auto& kv : countMap)
    {
        cout << kv.first << ":" << kv.second << endl;
    }
}
int main() {
//    OpenAddress::TestHashTable1();
//    test_unordered_set1();
//    lty::test_unordered_set1();
    lty::test_unordered_map1();
    return 0;
}
